Skip to content

Conversation

junaed-optimizely
Copy link
Contributor

@junaed-optimizely junaed-optimizely commented Aug 21, 2025

Summary

Added holdout support in decision service.

Test plan

Tests: Comprehensive tests addition

Issues

FSSDK-11546

@junaed-optimizely junaed-optimizely marked this pull request as ready for review August 22, 2025 15:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds holdout support to the Optimizely .NET SDK's decision service, enabling the SDK to evaluate holdouts (experiments that exclude users from treatment) alongside existing experiments and rollouts.

  • Refactored the inheritance hierarchy to use ExperimentCore as the base class for both experiments and holdouts
  • Implemented holdout evaluation logic in the decision service with proper priority ordering (holdouts → experiments → rollouts)
  • Added comprehensive test coverage for holdout functionality including bucketing, decision reasons, and user context operations

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ExperimentCore.cs Added base class with common experiment/holdout properties and moved shared logic from Experiment class
Holdout.cs Modified to override LayerId property to always return empty string as holdouts don't belong to layers
Experiment.cs Removed duplicate properties now inherited from ExperimentCore
DecisionService.cs Added GetDecisionForFlag method implementing holdout evaluation with proper priority ordering
Bucketer.cs Updated to accept ExperimentCore instead of Experiment for holdout compatibility
FeatureDecision.cs Added holdout decision source constant and updated to use ExperimentCore
Various other files Updated method signatures to use ExperimentCore for holdout compatibility
Test files Added comprehensive holdout test coverage including bucketing, decision service, and user context tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@muzahidul-opti muzahidul-opti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, few comments added

@junaed-optimizely junaed-optimizely merged commit 8dbaeb1 into master Aug 25, 2025
9 of 10 checks passed
@junaed-optimizely junaed-optimizely deleted the junaed/fssdk-11546-holdout-decision-service-impl branch August 25, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants